cb3b76a74800fd130511317af1be7e8007e71987,java/java-analysis-impl/src/com/intellij/codeInspection/StreamApiMigrationInspection.java,StreamApiMigrationInspection,extractAddend,#PsiAssignmentExpression#,231

Before Change


      } else if(JavaTokenType.EQ.equals(assignment.getOperationTokenType())) {
        if (assignment.getRExpression() instanceof PsiBinaryExpression) {
          PsiBinaryExpression binOp = (PsiBinaryExpression)assignment.getRExpression();
          if(JavaTokenType.PLUS.equals(binOp.getOperationTokenType()) && binOp.getROperand() != null) {
            if(binOp.getLOperand().getText().equals(assignment.getLExpression().getText())) {
              return binOp.getROperand();
            }
            if(binOp.getROperand().getText().equals(assignment.getLExpression().getText())) {
              return binOp.getLOperand();
            }
          }

After Change


            if(sameReference(binOp.getLOperand(), assignment.getLExpression())) {
              return binOp.getROperand();
            }
            if(sameReference(binOp.getROperand(), assignment.getLExpression())) {
              return binOp.getLOperand();
            }
          }